package rs.udd.service.mappings;

import java.util.HashSet;

import rs.udd.model.Advert;
import rs.udd.model.Category;

public class CategoryMapping {

	private CategoryMapping() {
	}
	
	public static Category mapForBrowse(Category otherCategory) {
		Category category = new Category();
		
		category.setAdverts(new HashSet<Advert>());
		category.setCreationTime(otherCategory.getCreationTime());
		category.setHiddenByAgents(otherCategory.getHiddenByAgents());
		category.setId(otherCategory.getId());
		category.setModificationTime(otherCategory.getModificationTime());
		category.setName(otherCategory.getName());
		category.setVersion(otherCategory.getVersion());
		
		return category;
	}
	
}
